package cn.jsj.cases.dispose;

import java.io.IOException;
import java.util.Date;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 所业绩查看处理类
 * @author LI
 *
 */
 public class OfficePerformanceLook extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {
	 public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		 //调试信息
		 cn.jsj.utils.SysLogger.PrintInfo("所业绩查看！");

		 //获取时间段
		 Date startTime=cn.jsj.utils.TimeDispose.transferDate(request.getParameter("officestartTime").trim());
		 Date endTime=cn.jsj.utils.TimeDispose.transferDate(request.getParameter("officeendTime").trim());

		 //调试信息
		 cn.jsj.utils.SysLogger.PrintInfo("时间段------>"+startTime+endTime);

		 //时间段参数类
		 cn.jsj.bgtodb.ExcerptTime et=new cn.jsj.bgtodb.ExcerptTime();
		 et.setEndTime(endTime);
		 et.setStartTime(startTime);

		 //获取某段时间内所业绩
		 cn.jsj.dao.TblCaseInfoDAO tcid=new cn.jsj.dao.TblCaseInfoDAO();
		 	String officePerformance=tcid.getOfficePerformance(et);

		 	//输出流
		 	java.io.PrintWriter out=response.getWriter();

		 	//输出结果
		 	out.println("{message:'"+officePerformance+"'}");
		 	out.flush();
		 	out.close();
	}
}